<?php
if (isset($_POST["submit"]) and $_POST["submit"]){
$resp = recaptcha_check_answer ($privatekey,
						$_SERVER["REMOTE_ADDR"],
						$_POST["recaptcha_challenge_field"],
						$_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
// What happens when the CAPTCHA was entered incorrectly
//echo ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
// "(reCAPTCHA said: " . $resp->error . ")");
$captchaError =  "Erro ao validar CAPTCHA, tente novamente.";
} else {
	

$comentario = new Comment();
$comentario->nome = $_POST["nome"];
$comentario->text = $_POST["text"];
$comentario->save();

}
	
	
// Your code here to handle a successful verification
?>
<?php
}
?>